<template>
    <div class="profile-container">
        <el-menu
            :default-active="activeIndex2"
            class="el-menu-demo"
            mode="horizontal"
            @select="handleSelect"
            background-color="#545c64"
            text-color="#fff"
            active-text-color="#ffd04b" router unique-opened >
            <el-menu-item index="/profile/profileInfo" >店铺信息</el-menu-item>
            <el-menu-item index="/profile/common">通用设置</el-menu-item>
            <el-menu-item index="/profile/manager">管理员</el-menu-item>
            <el-menu-item index="/profile/priter">打印机</el-menu-item>
        </el-menu>
        <!-- 需要展示的子路由的视图 -->
        <router-view ></router-view>

    </div>
</template>
<script>
export default {
    data(){
        return {
              activeIndex2:'/profile/profileInfo',//默认点亮的item页面
        }
    },
    computed:{
    },
    mounted(){
        
    },
    methods: {
      handleSelect(key, keyPath) {
          this.activeIndex2 = this.$route.path.replacse('/','');        
      }
    }
}
</script>
<style lang="scss" scoped>
</style>


